LIBS = $(wildcard libs/*)
CC = arm-linux-gcc
BIN = index

CPPFLAGS += -I ./include
CPPFLAGS += -I ./include/libxml2
LDFLAGS  += -L ./libs

LDFLAGS += -lxml2
LDFLAGS += -lasound
LDFLAGS += -lz
LDFLAGS += -lvnet 
LDFLAGS += -lpthread

LDFLAGS += -Wl,-rpath=. -Wl,-rpath=./libs

$(BIN):src/index.c \
src/com_file_opt.c \
src/lcd_opt.c 		\
src/com_net_opt.c \
src/ts_opt.c \
src/xml_opt.c \
		$(LIBS)
	$(CC) $^ -o bin/$@ $(CPPFLAGS) $(LDFLAGS) -Wall

clean:
	rm bin/$(BIN) 
